﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Configuration;
using System.Text;

namespace WFL.Threading
{
    public class BatchRuntimeConfigurationElement : ConfigurationElement
    {
        [ConfigurationProperty("name"
            , IsKey = true)]
        public string Name
        {
            get { return (string)this["name"]; }
            set { this["name"] = value; }
        }

        [ConfigurationProperty("maxThreadCount")]
        public int MaxThreadCount
        {
            get { return (int)this["maxThreadCount"]; }
            set { this["maxThreadCount"] = value; }
        }

        [ConfigurationProperty("batches", IsDefaultCollection = true)]
        [ConfigurationCollection(typeof(BatchConfigurationElement))]
        public BatchConfigurationElementCollection Batches
        {
            get { return (BatchConfigurationElementCollection)this["batches"]; }
            set { this["batches"] = value; }
        }

        public BatchRuntimeConfigurationElement()
        {
            
        }
    }
}
